package com.study.scala.string

import scala.util.Random

object StringTest {
  def main(args: Array[String]): Unit = {
    // println(concat("aa", "bb"))

//    println(hasUpperCase("ab"))
//    println(hasUpperCase("aB"))
    
        val random = new Random();
        
        println(random.nextInt(2))

  }

  def hasUpperCase(s: String): Boolean = {
    s.exists(_.isUpper)
  }

  def concat(str1: String, str2: String): String = {
    val result = str1 concat "@" concat str2;
    return result;
  }

}